<template>
	<view class="flex col-center row-between h88 mt32 radius20 pl30 pr30"
		style="box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.04);">
		<view class="flex col-center">
			<image src="/static/image/home/notice.png" class="w90 h28"></image>
			<view class="felx1 flex col-center">
				<u-notice-bar class="w450" mode="vertical" :list="noticeNames" :volume-icon="false" color="#333"
					bg-color="none" :more-icon="false" @click="toNoticeDetail"></u-notice-bar>
			</view>
		</view>
		<text class="moretxt text-nowrap" @click="toNoticePage">更多</text>
	</view>
</template>

<script>
	export default {
		name: 'notice',
		props: {
			noticeNames: {
				type: Array,
			},
			noticeList: {
				type: Array,
			}
		},
		data() {
			return {

			}
		},
		mounted() {},
		methods: {
			toNoticeDetail(index) {
				console.log(index)
				let id = this.noticeList[index].id
				uni.navigateTo({
					url: '/pages/home/notice/detail?id=' + id
				})
			},
			toNoticePage() {
				uni.navigateTo({
					url: '/pages/home/notice/index'
				})
			}
		}
	}
</script>

<style>
</style>
